package com.hjb.service.impl.coupon;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hjb.service.coupon.CouponRuleService;
import com.hjb.service.domain.couponrule.CouponRule;
import com.hjb.service.domain.couponrule.CouponRuleExample;
import com.hjb.service.mapper.CouponRuleMapper;

@Service
public class CouponRuleServiceImpl implements CouponRuleService {

	private Logger log = LoggerFactory.getLogger(CouponRuleServiceImpl.class);
	
	@Autowired
	private CouponRuleMapper couponRuleMapper;

	@Override
	public List<CouponRule> selectByExample(CouponRuleExample example) {
		return couponRuleMapper.selectByExample(example);
	}

	@Override
	public int insertCouponRule(CouponRule couponRule) {
		return couponRuleMapper.insertSelective(couponRule);
	}

	@Override
	public void updateCouponRule(CouponRule couponRule) {
		couponRuleMapper.updateByPrimaryKeySelective(couponRule);
	}
	
}
